import { useEffect, useState } from 'react'
import axios from 'axios'
import { connect } from 'react-redux'
import RouteView from './route/RouteView'
import routes from './route/routes'
function App() {
  // let ss = 'http://1231231/?title=欢迎来到Vue3的世界'
  // let arr = ss.split('?')
  // let url = ss.split('=')[1]
  // const [use] = useState(
  // [
  //   { name: '张三', sex: '男', age: 30, score: 100 },
  //   { name: '李四', sex: '女', age: 32, score: 80 }
  // ]
  // )
  // // console.log(use)
  // let [list, setList] = useState([])
  // useEffect(() => {
  //   axios.get("http://localhost:3000/student").then(res => {
  //     // console.log('这是数据接口', res)
  //     setList(res.data)
  //   })
  // })
  // console.log(list)

  return (
    <>
      <RouteView routes={routes} />
      {/* <h1>{url}</h1>
      <h2>学生信息表</h2>
      <ul >
        {
          list.map((item) => {
            return (
              <li key={item.id}>
                <p>{item.name}</p>
                <p>{item.sex}</p>
                <p>{item.age}</p>
                <p>{item.score}</p>
              </li>
            )
          })
        }

      </ul> */}
    </>
  )
}

export default App
